import 'package:ball_lion/entity/expert/plan_Info_entity.dart';
import 'package:ball_lion/entity/expert/plan_form/plan_form_detail_entity.dart';

enum MatchPlayType { viewpoint, planForm }

class MatchPlayEntity {
  List<PlanItemShowEntity>? itemShow;
  bool? canRead;
  int? status;
  int? playType;
  MatchPlayType? type;

  MatchPlayEntity(
      {this.itemShow, this.canRead, this.status, this.type, this.playType});

  MatchPlayEntity.fromViewpoint(PlanInfoEntity? entity) {
    itemShow = entity?.itemShow;
    canRead = entity?.isCanRead == 1;
    status = entity?.planStatus;
    type = MatchPlayType.viewpoint;
  }

  MatchPlayEntity.fromPlanForm(IssueDetail? entity) {
    itemShow = entity?.itemShow;
    canRead = true;
    status = entity?.state;
    type = MatchPlayType.planForm;
    playType = entity?.playType;
  }
}
